<?php
class Support extends Doctrine_Record
{
    
        public function setTableDefinition()
    {
        $this->hasColumn('company_gear_id', 'integer', 20);
        $this->hasColumn('it_gear_problem', 'string', 1000);
        $this->hasColumn('client', 'string', 255);
        $this->hasColumn('email', 'string', 255);
        $this->hasColumn('phone', 'string', 255);
        $this->hasColumn('set_job_user_id', 'integer', 20);
        $this->hasColumn('manage_job_user_id', 'integer', 20);
        $this->hasColumn('creater_job_user_id', 'integer', 20);
        $this->hasColumn('picture', 'string', 255);
        $this->hasColumn('meta', 'string', 1000);
    }
    public function setUp()
    {
        $this->actAs('Timestampable');             
        $this->hasMany('Company_gear as Company_gears', array(
                'local' => 'company_gear_id',
                'foreign' => 'id'
            )
        );
        $this->hasOne('Comment', array(
                'local' => 'id',
                'foreign' => 'support_id'
             )
        );
        $this->hasOne('User', array(
                'local' => 'set_job_user_id',
                'foreign' => 'id'
             )
        );
    }


    }

